import React from 'react';
import ReactDOM from 'react-dom';
import AsyncDemo from './AsyncDemo/index.jsx';
import SyncDemo from './SyncDemo/index.jsx';
import Other from './Other/index.jsx';
import { Routers } from '../routes';

import store from '../store';


//不使用router，只是展示一个默认的界面
// const render = () => {
//     console.log(store)
//     ReactDOM.render(
//         <Provider store={store}>
//             <div>
//                 <SyncDemo />
//                 <AsyncDemo />
//                 <Other />
//             </div>
//         </Provider>, document.getElementById('root')
//     );
// };



//使用router
const render = () => {
    console.log(store)
    ReactDOM.render(
        <div store={store}>
            <Routers />
        </div>, document.getElementById('root')
    );
};




render();
